/**
 * 详单查询
 */
import request from '@/utils/request';

// 查询业务概况（健康度，成功率等环形图数据）
export function getBuinessDataPercen(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/overview/getBuinessHealthAndSuccessRatePercen',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询告警类型比例(环形图数据来源)
export function getBusinessAlarmPercent(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/alarm/business/getBusinessMonitorAlarmPercent',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询业务健康度、访问量、平均响应时长、受理量等折线图数据
export function getBuinessLineChartData(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/overview/getBuinessLineChartData',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'LSH',
			'Content-Type': 'application/json; charset=UTF-8',
		},
	});
}

// 查询相应的步骤分析信息
export function getBuinessProcessAnalysis(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/overview/getBuinessProcessAnalysis',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 查询业务步骤的健康度、响应时长趋势、请求量、告警量趋势 等折线图数据
export function getBuinessProcessTrendData(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/overview/getBuinessProcessTrendData',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 转化率图形
export function getConversionRate(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/overview/getConversionRate',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 网端详细信息列表
export function getSegmentDetailList(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/overview/getSegmentDetailList',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 业务步骤IT路径图
export function stepEndToEndRelation(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/overview/stepEndToEndRelation',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}

// 修改节点位置
export function updateSegmentPosition(data: any): ApiPromise<ApiResponse> {
	return request({
		url: '/business-monitor/business/overview/updateSegmentPosition',
		method: 'post',
		data: data,
		headers: {
			VERSION: 'lishilei',
		},
	});
}
